<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class ModifyModel extends CI_Model {

    const  TBL_BATE='user';

    public function log($ab){
        $this->load->database();
        var_dump($ab);
        die();
       $info=$this->db->where($data)->get(self::TBL_BATE)->result_array();

    // echo $this->db->last_query();die();//打印sql语句
      if($info)
      {
          echo "<script type='text/javascript'> alert('登陆成功'); location.href = '/index.php/index/home';</script>";
         return  '登陆成功';
      }else{
          echo "<script type='text/javascript'> alert('登录失败'); location.href = '/index.php/login/index';</script>";
          return '登录失败';

      }

    }
}